﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace TB_WS.ASMX
{
    /// <summary>
    /// YM_SMS 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消注释以下行。 
    // [System.Web.Script.Services.ScriptService]
    public class YM_SMS : System.Web.Services.WebService
    {

        [WebMethod(Description ="查询短信余额")]
        public int Get_Balance(string SN,string KEY)
        {
            return Convert.ToInt32(Class.Unit.SMS.getBalance(SN, KEY));
        }

        [WebMethod(Description ="发送短信")]
        public int Send_SMS(string SN,string KEY,string Phone_Numbers,string SMS)
        {
            return Convert.ToInt32(Class.Unit.SMS.sendSMS(SN, KEY, "", Phone_Numbers.Split(','), SMS, "", "GBK", 2, LeShiTao_Library.Tools.Data_Handle.GET_UNIX_TIMESTAMP()));
        }
    }
}
